package com.mde.mapspathfinder;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

import com.mde.mapspathfinder.activ.GoogleMapActivity;
import com.mde.mapspathfinder.activ.OpenMapActivity;
import com.mde.mapspathfinder.activ.YandexMapActivity;
import com.mde.yandexmaptrial.R;

public class MainActivity extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
	public void yandexClick(View v) {
		Intent intent = new Intent(MainActivity.this, YandexMapActivity.class);
		startActivityForResult(intent, 1);
	}
	
	public void googleClick(View v) {
		Intent intent = new Intent(MainActivity.this, GoogleMapActivity.class);
		startActivityForResult(intent, 1);
	}
	
	public void openClick(View v) {
		Intent intent = new Intent(MainActivity.this, OpenMapActivity.class);
		startActivityForResult(intent, 1);
	}
	
	@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		
		finishActivity(requestCode);
		data = null;
		
    }

}
